package cn.xxliang.platapp.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("功能信息Dto")
public class MenuInfoDto {
    @ApiModelProperty(value = "主键ID")
    private String menuId;

    @ApiModelProperty(value = "功能名称",required = true)
    @NotNull(message = "功能名称不能为空")
    //@Size(max = 50, message = "功能名称限制50字符，超出不展示")
    private String menuName;

    @ApiModelProperty(value = "删除标识 0-正常 1-删除", allowableValues = "0,1",required = true)
    private Integer deleteFlag;

    @ApiModelProperty(value = "功能状态 0-未使用 1-使用中", allowableValues = "0,1",required = true)
    @NotNull(message = "功能状态不能为空")
    @Size(min = 1, max = 1, message = "功能状态必须是0或1")
    @Pattern(regexp = "[01]", message = "功能状态必须是0或1")
    private Integer menuStatus;

    @ApiModelProperty("创建时间")
    private String createTime;

    @ApiModelProperty("更新时间")
    private String updateTime;
}


